//
// module dependences
//

var DB = require("./mdb.js");


//-------------------------------------------------------------------------------------------------
function User(rn, a, e, m, pass, s, addr, prof, perm)
{
	this._id;						//由数据库生成
	this.real_name = rn;
	this.age = a;
	this.email = e;
	this.mobile = m;
	this.password = pass;
	this.salt = s;
	this.address = addr;
	this.profession = prof;
	this.permissions = perm;
	this.philharmonics_info = [];	//新建用户时数据库自动生成空记录，无需参数传入
	this.phil_cnt = 0;				//新建用户时数据库自动生成空记录，无需参数传入
	this.remarks = null;			//新建用户时数据库自动生成空记录，无需参数传入
	this.photos = [];				//新建用户时数据库自动生成空记录，无需参数传入
	this.photos_cnt = 0;			//新建用户时数据库自动生成空记录，无需参数传入
	this.videos = [];				//新建用户时数据库自动生成空记录，无需参数传入
	this.fideos_cnt = 0;			//新建用户时数据库自动生成空记录，无需参数传入
}

User.prototype =
{
	copy : function(o)
	{
		for (p in this)
		{
			this[p] = o[p];
		}
	}
	// getFromCursor : function(cur)
	// {
		// var temp = cur.
	// }
}


//-------------------------------------------------------------------------------------------------
function PhilharmonicInfo(phil_id, role, fee, bonus, bonus_cnt)
{
	this.phil_id = phil_id;
	this.role = role;
	this.fee = fee;
	this.bonus = bonus;
	this.bonus_cnt = bonus_cnt;
}
PhilharmonicInfo.prototype = 
{
	copy : function(o)
	{
		for (p in this)
		{
			this[p] = o[p];
		}
	}
}
//-------------------------------------------------------------------------------------------------




exports.User = User;
exports.PhilharmonicInfo = PhilharmonicInfo;









